﻿using Cloud.Core.AuthUser;
using Cloud.Core.Bizlogic;
using Cloud.Core.Model;
using Cloud.Core.ModelSearch;
using Cloud.Core.Response;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using Cloud.Core.Model.Promotion;
using System.Linq;

namespace Cloud.Core.Controllers.WebChat
{
    [Route("api/wx/[controller]")]
    public class PromotionsQuestionController : ControllerBase
    {
        private readonly CloudDataBase _context;
        public PromotionsQuestionController(CloudDataBase context)
        {
            _context = context;
        }
        /// <summary>
        /// 获取全部问题信息
        /// </summary>
        /// <returns></returns>
        [Route("GetList")]
        [HttpPost]
        public async Task<JsonResponse<List<PromotionsQuestion>>> GetList(string temp)
        {
            var list =  await _context.PromotionsQuestion.Where(t => 1 == 1).ToListAsync();
            return new JsonResponse<List<PromotionsQuestion>>
            {
                Data= list,
                Msg = "获取成功",
                Status = ResponseStatus.Success
            };
          
        }

    }
}
